package com.sevenmall.productservice.service.impl;

import com.sevenmall.productservice.pojo.Brand;
import com.sevenmall.productservice.mapper.BrandMapper;
import com.sevenmall.productservice.service.BrandService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 品牌商表 服务实现类
 * </p>
 *
 * @author Yesi
 * @since 2020-08-24
 */
@Service
public class BrandServiceImpl extends ServiceImpl<BrandMapper, Brand> implements BrandService {

    @Autowired
    BrandMapper brandMapper;


    @Override
    public Brand selectById(int id) {
        Brand brand = brandMapper.selectById(id);
        return brand;
    }

    @Override
    public int insert(Brand brand) {
        int feedback = brandMapper.insert(brand);
        return feedback;
    }

    @Override
    public int deleteById(Integer id) {
        int feedback = brandMapper.deleteById(id);
        return feedback;
    }

    @Override
    public int update(Brand brand) {
        int feedback = brandMapper.update(brand);
        return feedback;
    }
}
